import 'package:flutter/material.dart';

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: Text('变换容器'),
        ),
        body: Center(
          child: Column(
            children: [
              TransFormWidget(),
              SizedBox(
                height: 30.0,
              ),
              ScaleWidget(),
            ],
          ),
        ),
      ),
    );
  }
}

class TransFormWidget extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Transform(
      transform: Matrix4.skewY(0.3),
      child: Text('HelloWorld'),
    );
  }
}

// 缩放变换
class ScaleWidget extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Transform.scale(
      scale: 1.5,
      child: Text('缩放'),
    );
  }
}
